import Vue from 'vue'
import router from 'vue-router'
Vue.use(router);
export default new router({
    mode: 'history',
    routes: [
        { path: '/login', meta: { title: '登录' }, component: (resolve) => require(['./components/login'], resolve) },
        {
            path: '/', component: (resolve) => require(['./components/box'], resolve), children: [
                { path: '/', meta: { title: "首页" }, component: (resolve) => require(['./components/home/index'], resolve) },
                { path: '/evaluate', meta: { title: "考评管理" }, component: (resolve) => require(['./components/evaluate/index'], resolve) },
                { path: '/evaluate/handle', meta: { title: "考评操作" }, component: (resolve) => require(['./components/evaluate/handle/index'], resolve) },
                { path: '/toilet', meta: { title: "厕所管理" }, component: (resolve) => require(['./components/toilet/index'], resolve) },
                { path: '/setting/personal', meta: { title: '个人中心' }, component: (resolve) => require(['./components/setting/index'], resolve) },
                { path: '/setting/user', meta: { title: '用户管理' }, component: (resolve) => require(['./components/setting/user/index'], resolve) },
                { path: '/setting/street', meta: { title: '街道管理' }, component: (resolve) => require(['./components/setting/street/index'], resolve) },
                { path: '/setting/standard', meta: { title: '标准管理' }, component: (resolve) => require(['./components/setting/standard/index'], resolve) },
            ]
        },
        // 404
        { path: '/404', name: '404', meta: { title: '404' }, component: (resolve) => require(['./components/404'], resolve) },
        { path: '*', name: '404', meta: { title: '404' }, component: (resolve) => require(['./components/404'], resolve) },
    ]
})